---
import { Image } from "astro:assets";
import config from "@/config/config.json";
import menu from "@/config/menu.json";
import {marked} from "marked";
const markdownify = marked.parseInline

const { footer_content, copyright } = config.params;
---

<footer class="section bg-theme-light pb-0">
	<div class="container">
		{/* footer menu */}
		<div class="row">
			{
				menu.footer.map((col) => {
					return (
						<div class="mb-12 sm:col-6 lg:col-3">
							<h2 class="h4" set:html={markdownify(col.name)} />
							<ul class="mt-6">
								{col?.menu.map((item) => (
									<li class="mb-1">
										<a href={item.url} rel="">
											{item.text}
										</a>
									</li>
								))}
							</ul>
						</div>
					);
				})
			}
			{/* social icons */}
			<div class="md-12 sm:col-6 lg:col-3">
				<a href="/" aria-label="Bigspring">
					<Image
						src={config.site.logo}
						width={Number(config.site.logo_width)}
						height={Number(config.site.logo_height)}
						alt=""
					/>
				</a>

				<p class="mt-3 mb-6" set:html={markdownify(footer_content)} />
			</div>
		</div>
		{/* copyright */}
		<div class="border-t border-border py-6">
			<p class="text-sm text-center" set:html={markdownify(copyright)} />
		</div>
	</div>
</footer>
